<template>
	<view class="container">
		<jpproitem v-for="(item,index) in list" :key="index" :pro="item"></jpproitem>
	</view>
</template>

<script>
	import {getAuctionGoodList} from '@/api/product.js'
	export default{
		data(){
			return{
				list:[]
			}
		},
		onLoad() {
			this.getlist()
		},
		methods:{
			getlist(){
				let nowTime=new Date()
				getAuctionGoodList().then(res=>{
					// console.log(res)
					this.list=res.data.data.data
					this.list.map(t => {
						t.img = this.$BASE_URL + t.images.split(',')[0]
						t.time= (new Date(t.auction_start_time)).getTime() - nowTime.getTime()
						t.time1= (new Date(t.auction_end_time)).getTime() - nowTime.getTime()
					})
				})
			}
		}
	}
</script>

<style lang="less">
	page{
		background-color: #F7F7F9;
	}
	.container{
		padding: 28rpx 30rpx;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		justify-content: space-between;
	}
</style>